/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package view.promo;

import javax.swing.AbstractListModel;
import javax.swing.ComboBoxModel;
import javax.swing.JCheckBox;

/**
 *
 * @author Lalugina
 */
public class ComboModol extends AbstractListModel implements ComboBoxModel 
{

    JCheckBox[] choices;
    Object selectedItem;

    public ComboModol(JCheckBox[] choices) {
        this.choices = choices;
    }
    
    
    @Override
    public int getSize() {
        return choices.length;
    }

    @Override
    public Object getElementAt(int index) {
         return (JCheckBox)choices[index];
    }

    @Override
    public void setSelectedItem(Object anItem) {
         this.selectedItem = anItem;
    }

    @Override
    public Object getSelectedItem() {
        return this.selectedItem;
    }
    
}
